import sys,time
import os

from Model_ranliaobiJob import Model_ranliaobiJob
from Model_ranliaobi4Job import Model_ranliaobi4Job
from Model_ranliaobi3Job import Model_ranliaobi3Job
from Model_ranliaobi2Job import Model_ranliaobi2Job

def main(bf_no):
    elapsed = 0
    try:
        bf_no = int(bf_no)
        success_tmp = True
        msg = ''
        timestamp = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
    except Exception as e:
        success_tmp = False
        msg = f'invalid_parameter_type--{str(e)}'
        timestamp = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
    if success_tmp:
        msg, elapsed = Model_ranliaobiJob(p_bf_no=bf_no).execute()
        # msg, elapsed = Model_ranliaobi3Job(p_bf_no=bf_no).execute()
        # msg, elapsed = Model_ranliaobi2Job(p_bf_no=bf_no).execute()

        timestamp = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
        success_tmp = True
    success = success_tmp
    message = msg
    timestamp = timestamp
    elapsed = elapsed
    return success, message, timestamp, elapsed
if __name__ == '__main__':
    bf_no = 1
    success, message, timestamp, elapsed = main(bf_no)
    print(success, message, timestamp, elapsed)
